package p700;

public class Leetcode_779 {
    public int kthGrammar(int N, int K) {
        return Integer.bitCount(K - 1) % 2;

    }

    public static void main(String[] args) {
    }
}
